1. Field of the Art
This invention relates to a microcomputer, and more particularly to a one-chip microcomputer incorporating an EPROM for storing programs and data which a CPU executes.
2. Prior Art
In general, a one-chip MCU (Micro-Computer Unit) which incorporates an EPROM (Electrically Programmable Read Only Memory) as well as a CPU (Central Processing Unit), has a microcomputer mode which operates as a microcomputer, an EPROM mode which writes in and reads from the EPROM and a test mode which tests the CPU. Each of these modes is determined by a state of each of terminals of I/O (input/output) port, clock, reset, other control input signals, or the like, when power supply is applied, or reset is released.
The mode generally used by the user is the microcomputer mode. The switching between the microcomputer mode, the EPROM mode and the test mode is determined by a state of each of the above-described terminals. Hence, the user must design circuitry taking into consideration the state of each terminal so that an undesired mode is not obtained when power is input, or power is released or cutoff. Thus, there are problems when interfacing with peripheral circuits.
Terminal conditions can be uniformly fixed when the EPROM mode is used. However, in order to operate the EPROM mode by the same specifications as those for a general purpose EPROM, and write in and read from the EPROM mode by a general purpose programmer, it is necessary to provide a power supply programming terminal V.sub.pp, an address terminal, a data terminal and a control terminal. The power supply programming terminal V.sub.pp is used only when the EPROM mode is selected, and not used in the microcomputer mode and test mode.
Further, in a microcomputer incorporating a mask ROM, which has the same functions as a microcomputer incorporating an EPROM, the power supply programming terminal V.sub.pp is unnecessary too. However, considering compatibility of both the microcomputers, it is necessary, in the microcomputer incorporating a mask ROM, that a terminal corresponding to the power supply programming terminal V.sub.pp of the microcomputer incorporating an EPROM having the same functions is not used, i.e., in the state of NC (no connection). Hence, there is a problem that the microcomputer incorporating a mask ROM must be originally designed with the number of terminals less by one terminal.
As described above, in the conventional microcomputer incorporating an EPROM, there is a problem that, when the user uses the microcomputer as the microcomputer mode, a restraint arises in the design of interface with peripheral circuits due to the setting of terminal conditions for switching modes. There is also a problem that a restraint arises in the use of terminals, because it is necessary to provide the power supply programming terminal V.sub.pp which is used only for the EPROM mode.